============================================================================================================================
Modification Title: Portal System

Version: 2.4

Author: John Briggs

Description: This modification will add a Portal system interface section to your forum.

Copyright:  2010 John Briggs. All Rights Reserved.

Compatability: XMB 1.9.5 SP1

Install Note: Before adding this modification to your forum, you should back up all files related to this modification.

License Note: This modification is released under the GPL License v3. A copy is provided with this software package.

Author Note:
You downloaded this modification from XMBGarage.com, the #1 source for XMB related downloads.
Please visit http://www.xmbgarage.com/ for support.
============================================================================================================================
=======
Step 1:
=======

Please upload the following files to your forum directory.

"portal.php", "cp_portal.php", "portal.xmb"

Please upload the following file to your forum "lang" directory.

"English.portal.php"

Please upload the following image to all your theme folders.

"portal.gif"

============================================================================================================================
=======
Step 2:
=======
=================
Edit File: header.php
=================
==========
Find Code:
==========

,'posts'

================
Replace Code With:
================

,'portal_templates','posts'

==========
Find Code:
==========

require_once(ROOT.'lang/'.$langfile.'.lang.php');

===============
Add Code Below:
===============

// Portal System Mod Begin
// Get the required portal language file
if (file_exists(ROOT.'lang/'.$langfile.'.portal.php')) {
    require_once(ROOT.'lang/'.$langfile.'.portal.php');
} else {
    require_once(ROOT.'lang/English.portal.php');
}
// Portal System Mod End

==========
Find Code:
==========

        $logo = '<a href="index.php"><img src="'.$boardimg.'" alt="'.$bbname.'" border="0" /></a>';

==================
Replace Code With:
==================

        $logo = '<a href="index.php?forums"><img src="'.$boardimg.'" alt="'.$bbname.'" border="0" /></a>';

==========
Find Code:
==========

// Search-link
if ( $SETTINGS['searchstatus'] == "on") {
    $links[] = "<img src=\"$imgdir/search.gif\" alt=\"$lang[altsearch]\" border=\"0\" /> <a href=\"misc.php?action=search\"><font class=\"navtd\">$lang[textsearch]</font></a>";
}

===============
Add Code Above:
===============

// Portal-link
if ($SETTINGS['portalstatus'] == 'on') {
    if (false === strpos($url, 'portal.php') || false !== strpos($url, 'cp_portal.php')) {
        $links[] = '<img src="'.$THEME['imgdir'].'/portal.gif" alt="'.$lang['portalnav'].'" title="'.$lang['portalnav'].'" border="0" /> <a href="portal.php"><font class="navtd">'.$lang['portalnav'].'</font></a>';
    } else {
        $links[] = '<img src="'.$THEME['imgdir'].'/portal.gif"alt="'.$lang['portalindexnav'].'" title="'.$lang['portalindexnav'].'" border="0" /> <a href="index.php?forums"><font class="navtd">'.$lang['portalindexnav'].'</font></a>';
    }
}

============================================================================================================================
=======
Step 3:
=======
===============
Edit File: index.php
===============
==========
Find Code:
==========

require "./header.php";

===============
Add Code Below:
===============

// Portal System Mod Begin
if ($SETTINGS['portalstatus'] == 'on' && $SETTINGS['portalview'] == 'on' && !isset($forums) && !isset($gid)) {
    redirect('portal.php', 0);
}
// Portal System Mod End

============================================================================================================================
=======
Step 4:
=======
===========================
Edit File: include/admin.user.inc.php
===========================
========================
Find Code At Very End Of File:
========================

    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    <br />
    <?php
}
?>

===============
Add Code Above:
===============

    <!-- Portal System Mod Begin -->
    &raquo;&nbsp;<a href="cp_portal.php"><?php echo $lang['portalcp']?></a><br />
    <!-- Portal System Mod End -->

============================================================================================================================
=======
Step 5:
=======
===============
Edit File: misc.php
===============
==========
Find Code:
==========

    } elseif (false !== strpos($url, "/cp.php") || false !== strpos($url, "/cp2.php")) {

================
Replace Code With:
================

    } elseif (false !== strpos($url, '/cp.php') || false !== strpos($url, '/cp2.php') || false !== strpos($url, '/cp_portal.php')) {

==========
Find Code:
==========

    } elseif (false !== strpos($url, "/topicadmin.php")) {
        $location = $lang['onlinetopicadmin'];

===============
Add Code Below:
===============

    // Portal System Mod Begin
    } elseif (false !== strpos($url, '/portal.php')) {
        $location = $lang['portalonline'];
    // Portal System Mod End

============================================================================================================================
=======
Step 6:
=======
===============================
Go To Administration Panel --> Templates
===============================
=================
Edit Template: footer
=================
==========
Find Code:
==========

index.php

================
Replace Code With:
================

index.php?forums

============================================================================================================================
=======
Step 7:
=======

===============================
Go To Administration Panel --> Templates
===============================
=================
Edit Template: header
=================
==========
Find Code:
==========

index.php

================
Replace Code With:
================

index.php?forums

============================================================================================================================
=======
Step 8:
=======

Please run install.php from your forum directory.

Example: http://www.yourdomain.ext/yourforum/install.php

============================================================================================================================
=======
Step 9:
=======

Please DELETE!! the following files from your "forum" directory if they still exist.

"install.php", "portal.xmb"

============================================================================================================================
========
Step 10:
========

To learn how to create new portal blocks please read the provided text file named "How_To.txt".

============================================================================================================================
Enjoy!